package mastercard.assets.jpa;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the tbl_subcateg database table.
 * 
 */
@Entity
@Table(name="tbl_subcateg")
public class TblSubcateg implements Serializable {
	private static final long serialVersionUID = 1L;
	private int cveSubcateg;
	private String descripcion;
	private Timestamp fechaAlta;
	private String nombre;
	private byte status;
	private TblCategoria tblCategoria;
	private List<TblAsset> tblAssets;

    public TblSubcateg() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="cve_subcateg", unique=true, nullable=false)
	public int getCveSubcateg() {
		return this.cveSubcateg;
	}

	public void setCveSubcateg(int cveSubcateg) {
		this.cveSubcateg = cveSubcateg;
	}


	@Column(nullable=false, length=2048)
	public String getDescripcion() {
		return this.descripcion;
	}

	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}


	@Column(name="fecha_alta", nullable=false)
	public Timestamp getFechaAlta() {
		return this.fechaAlta;
	}

	public void setFechaAlta(Timestamp fechaAlta) {
		this.fechaAlta = fechaAlta;
	}


	@Column(nullable=false, length=255)
	public String getNombre() {
		return this.nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}


	@Column(nullable=false)
	public byte getStatus() {
		return this.status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}


	//bi-directional many-to-one association to TblCategoria
    @ManyToOne
	@JoinColumn(name="cve_categoria")
	public TblCategoria getTblCategoria() {
		return this.tblCategoria;
	}

	public void setTblCategoria(TblCategoria tblCategoria) {
		this.tblCategoria = tblCategoria;
	}
	

	//bi-directional many-to-one association to TblAsset
	@OneToMany(mappedBy="tblSubcateg")
	public List<TblAsset> getTblAssets() {
		return this.tblAssets;
	}

	public void setTblAssets(List<TblAsset> tblAssets) {
		this.tblAssets = tblAssets;
	}
	
}